Tag Link | [RegExp->ReplaceFirst] | Category | String |
---|---|---|---|
Type | Member | Source Available | Yes |
Support | Preferred | Version | 8.5 |
Change | New | Data Source | Any |
Output Type | None | Security | None |
Implementation | Sets | Lasso 8.5 |
[RegExp->ReplaceFirst] is a utility tag which replaces the first instance of the find pattern in the input string with the replacement pattern and returns the result. The tag accepts optional parameters to override the
The [RegExp->ReplaceAll] tag functions similarly, but replaces every instance of the find pattern in the input string with the replement pattern.
Usually this tag will be used to apply the same find and replacement pattern against several different inputs. Since the find and replacement patterns are only compiled once a series of search/replace operations on different strings can be performed faster than with individual [String_ReplaceRegExp] tags.
[(RegExp:
Optional Parameters | |
---|---|
-Find | Specifies a new find pattern to use for the search/replace operation. Defaults to the current stored find pattern. |
-Replace | Specifies a new replacement pattern to use for the search/replace operation. Defaults to the current stored replacement pattern. |
-Input | Specifies the input to run the search/replace operation on. Defaults to the current stored input string. |
-IgnoreCase | If specified the search/replace operation is performed without regard to case. Defaults to the current setting in the regular expression type. |
See the Lasso 8 Language Guide for examples of how to use this tag.